package make.free.app.mcaro.game;

import org.anddev.andengine.engine.Engine;
import org.anddev.andengine.entity.scene.Scene;
import org.anddev.andengine.entity.sprite.Sprite;
import org.anddev.andengine.opengl.texture.TextureOptions;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlas;
import org.anddev.andengine.opengl.texture.atlas.bitmap.BitmapTextureAtlasTextureRegionFactory;
import org.anddev.andengine.opengl.texture.region.TextureRegion;

import android.content.Context;

public class O {
	private Scene mScene;
	private Engine mEngine;
	private Context mContext;
	private BitmapTextureAtlas bta_O;
    private TextureRegion tr_O;
    private int x,y,positionX,positionY;
    public boolean visible = true;
	public O(Scene mScene, Engine mEngine,Context mContext) {
		super();
		this.mScene = mScene;
		this.mEngine = mEngine;
		this.mContext = mContext;
	}
	public void onLoadResources() {
        this.bta_O = new BitmapTextureAtlas(64, 64,
                TextureOptions.BILINEAR_PREMULTIPLYALPHA);
        this.tr_O = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.bta_O, mContext, "o.png", 0, 0);
        mEngine.getTextureManager().loadTextures(this.bta_O);
    }
	public void onLoadScene(int positionX,int positionY,int x,int y) {
        Sprite a = new Sprite(positionX, positionY,this.tr_O);
        a.setVisible(visible);
        this.mScene.attachChild(a);
        this.positionX = positionX;
        this.positionY = positionY;
        this.x = x;
        this.y = y;
    }
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
	public int getPositionX() {
		return positionX;
	}
	public void setPositionX(int positionX) {
		this.positionX = positionX;
	}
	public int getPositionY() {
		return positionY;
	}
	public void setPositionY(int positionY) {
		this.positionY = positionY;
	}
	public void setVisible(boolean visible) {
		this.visible = visible;
	}
	
	
}
